import axios from '@/libs/request/axios'

/* ************银行卡信息变更************ */
// 银行卡信息申请或暂存过的案件列表  /contractManage/bankCardChange/getManageBankCardChangeList
export const getManageBankCardChangeList = (params) => {
    return axios.request({
        url: `/contractManage/bankCardChange/getManageBankCardChangeList`,
        method: 'POST',
        data: params
    })
};

// 删除按钮 contractManage/bankCardChange/delBankCardChange
export const delBankCardChange = (caseNo) => {
    return axios.request({
        url: '/contractManage/bankCardChange/delBankCardChange',
        method: 'post',
        data: {
            caseNo
        },
    })
}

//  银行卡变更详情查询 contractBasic/oldCustInfo/findOldBankInfo
export const findOldBankInfo = (data) => {
    return axios.request({
        url: '/contractBasic/oldCustInfo/findOldBankInfo',
        method: 'post',
        data: data,
    })
}

// 银行卡变更 已保存的数据 custInfoChange/findCustInfoDetial
export const findBankCardDetail = (data) => {
    return axios.request({
        url: '/contractManage/bankCardChange/findBankCardDetail',
        method: 'post',
        data: data,
    })
}

// 银行卡变更保存 /contractManage/bankCardChange/changeContractBankCardInfo
export const changeContractBankCardInfo = (params) => {
    return axios.request({
        url: '/contractManage/bankCardChange/changeContractBankCardInfo',
        method: 'post',
        data: params,

    })
}

// 银行卡提交 contractManage/bankCardChange/submitBankManage
export const submitBankManage = (params) => {
    return axios.request({
        url: '/contractManage/bankCardChange/submitBankManage',
        method: 'post',
        data: params,
    })
}

// 银行卡审批 （通过，拒绝，退回） contractManage/bankCardChange/saveProposalApplicationInfo
export const bankCardApprove = (params) => {
    return axios.request({
        url: '/contractManage/bankCardChange/saveProposalApplicationInfo',
        method: 'post',
        data: params,
    })
}

// contractManage/bankCardChange/saveProposalApplicationInfo
// 一键通过/拒绝
export const passOrReject = (data) => {
    return axios.request({
        url: '/contractManage/bankCardChange/saveProposalApplicationInfo',
        method: 'post',
        data: data,
    })
}

// 模板生成
export const contractTemplate = (data) => {
    return axios.request({
        url: '/contractManage/contractAttach/contractTemplate',
        method: 'post',
        data: data,
    })
}

// 模板列表
export const getComAttach = (data) => {
    return axios.request({
        url: '/contractManage/contractAttach/getComAttach',
        method: 'post',
        data: data,
    })
}



// 模板列表
export const downloadBatchFile = (data) => {
    return axios.request({
        url: '/contractManage/contractAttach/downBatchFile',
        method: 'post',
        data: data,
        responseType: 'blob'
    })
}

// contractManage/bankCardChange/saveProposalApplicationInfo
// 短信发送
export const verify = (data) => {
    return axios.request({
        url: '/contractManage/bankCardChange/verify',
        method: 'post',
        data: data,
    })
}

// contractManage/bankCardChange/saveProposalApplicationInfo
// 银行签约
export const sign = (data) => {
    return axios.request({
        url: '/contractManage/bankCardChange/sign',
        method: 'post',
        data: data,
    })
}
//  银行业务清单 excel  数据
export const downloadExcel = (data) => {
    return axios.request({
        url: 'contractManage/bankCardChange/findBankCardInfo',
        method: 'post',
        data,
    })
}

// 生成授权书打印模板
export const printPermitFile = (data) => {
    return axios.request({
        url: '/contractManage/contractAttach/printPermitFile',
        method: 'post',
        data: data,
    })
}

// 查询合同的主共借人
export const findContractPerson = (data) => {
    return axios.request({
        url: '/contractBasic/oldCustInfo/findContractPerson',
        method: 'post',
        data: data,
    })
}

/**
 * 刷新二维码
 * @returns {*}
 */
export const refresh = (data) => {
    return axios.request({
        url: `/contractManage/contractSmallProgram/refresh`,
        method: 'POST',
        data: data,
    })
}

export const getOCRBankInfo = (data) => {
    return axios.request({
        url: '/contractManage/bankCardChange/getOCRBankInfo',
        method: 'post',
        data: data,
    })
}

export const mergeUploadFile = (data) => {
    return axios.request({
        url: '/contractManage/contractAttach/mergeUploadFile',
        method: 'post',
        data: data,
    })
}




